using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class MobileTopRotatorContentMap : EntityTypeConfiguration<MobileTopRotatorContent>
    {
        public MobileTopRotatorContentMap()
        {
            // Primary Key
            this.HasKey(t => t.MobileTRContent_id);

            // Properties
            this.Property(t => t.Title)
                .HasMaxLength(50);

            this.Property(t => t.SubTitle)
                .HasMaxLength(150);

            this.Property(t => t.ActionBtnTxt)
                .HasMaxLength(20);

            this.Property(t => t.Link)
                .HasMaxLength(200);

            this.Property(t => t.Country)
                .HasMaxLength(2);

            // Table & Column Mappings
            this.ToTable("MobileTopRotatorContent");
            this.Property(t => t.MobileTRContent_id).HasColumnName("MobileTRContent_id");
            this.Property(t => t.Title).HasColumnName("Title");
            this.Property(t => t.TitleFontSize).HasColumnName("TitleFontSize");
            this.Property(t => t.SubTitle).HasColumnName("SubTitle");
            this.Property(t => t.SubTitleFontSize).HasColumnName("SubTitleFontSize");
            this.Property(t => t.ActionBtnTxt).HasColumnName("ActionBtnTxt");
            this.Property(t => t.ActionBtnTxtFontSize).HasColumnName("ActionBtnTxtFontSize");
            this.Property(t => t.Link).HasColumnName("Link");
            this.Property(t => t.Country).HasColumnName("Country");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
        }
    }
}
